package cn.qiguai.sphapi.controller.response;

import lombok.*;

/**
 * 响应对象
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Result {
	private int code;
	private String msg;
	private Object data;

	public Result(Status status) {
		this.code = status.getCode();
		this.msg = status.getMsg();
	}

	public Result(Status status, Object data) {
		this.code = status.getCode();
		this.msg = status.getMsg();
		this.data = data;
	}

	public void setStatus(Status status) {
		this.code = status.getCode();
		this.msg = status.getMsg();
	}
}
